﻿<%@ Control Language="C#" %>
<%@ Register Assembly="Antu.WebControls" Namespace="Antu.WebControls" TagPrefix="CBW" %>

<script language="javascript" type="text/jscript">
    function funCheck() {
        var input = document.getElementsByTagName("input");
        var i = "";
        for (var i = 0; i < input.length; i++) {
            if (input[i].type == "checkbox") {

                if (input[i].checked == true) {
                    i = "1";
                    break;
                }
            }
        }
        if (i != "1") {
            alert("请选择你要处理的流程！");
            return false;
        }
    }

    function funCheckAll() {
        var allInput = document.getElementsByTagName("input");
        for (var i = 0; i < allInput.length; i++) {
            if (allInput[i].type == "checkbox") {
                allInput[i].checked = true;
            }
        }
    }
    function funCheckNot() {
        var allInput = document.getElementsByTagName("input");
        for (var i = 0; i < allInput.length; i++) {
            if (allInput[i].type == "checkbox") {
                allInput[i].checked = false;
            }
        }
    }
    function funCheckAll(id) {
        var cb = document.getElementById(id);
        if (cb.checked == true) {
            var allInput = document.getElementsByTagName("input");
            for (var i = 0; i < allInput.length; i++) {
                if (allInput[i].type == "checkbox") {
                    allInput[i].checked = true;
                }
            }
        }
        else {
            funCheckNot();
        }
    }
</script>

<table class="gridtable">
    <tr>
        <th colspan="7">
            业务设置取消挂起管理
        </th>
    </tr>
    <tr>
        <td>
            业务编号：
        </td>
        <td>
            <asp:TextBox ID="txtIId" runat="server" CssClass="sInputCss"></asp:TextBox>
        </td>
        <td>
            业务名称：
        </td>
        <td>
            <asp:TextBox ID="txtName" runat="server" CssClass="sInputCss"></asp:TextBox>
        </td>
        <td>
            业务类型：
        </td>
        <td>
            <asp:DropDownList ID="ddlWname" runat="server">
            </asp:DropDownList>
        </td>
        <td>
            <asp:Button runat="server" ID="btnOK" Text="查 询" CssClass="Newbtn" />
        </td>
    </tr>
    <tr>
        <td colspan="7">
            <CBW:CustomGridView ID="gv" runat="server" Width="100%" AutoGenerateColumns="false"
                AllowPaging="true" PageSize="10">
                <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <input type="checkbox" onclick="funCheckAll('cbAll')" id="cbAll" />选择
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox runat="server" ID="cb" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="iid" HeaderText="业务编号" />
                    <asp:BoundField DataField="wname" HeaderText="业务类型" />
                    <asp:BoundField DataField="name" HeaderText="业务名称" />
                    <asp:BoundField DataField="申请挂起人" HeaderText="申请挂起人" />
                    <asp:BoundField DataField="确认挂起人" HeaderText="确认挂起人" />
                    <asp:BoundField DataField="description" HeaderText="挂起原因" ItemStyle-Width="100px" />
                    <asp:BoundField DataField="start_date" HeaderText="挂起时间" />
                </Columns>
            </CBW:CustomGridView>
        </td>
    </tr>
    <tr>
        <td colspan="7">
            <asp:Label ID="lbresult" runat="server" Visible="False" ForeColor="Red"></asp:Label>
        </td>
    </tr>
    <tr>
        <td colspan="7">
            <asp:Button ID="btnSuspend" runat="server" CssClass="Newbtn" Text="解除挂起" OnClientClick="return funCheck();" />
            &nbsp;&nbsp;&nbsp;
            <input type="button" value="关闭" class="Newbtn" onclick="window.close();" />
        </td>
    </tr>
    <tr>
        <td colspan="7">
            <asp:Label runat="server" ID="labMsg" ForeColor="red" />
        </td>
    </tr>
</table>
